<template>
  <div class="container">
      <group label-width="6.5em" label-margin-right="2em" label-align="right">
        <x-input title="收款人" v-model="payee"></x-input>
        <x-input title="账号类型" placeholder="必填" v-model="accountType"></x-input>
        <x-input title="收款人账号" placeholder="必填" v-model="payeeAccount"></x-input>
        <x-input title="提现金额" placeholder="必填" v-model="withdrawalAmount"></x-input>
       </group>
       <div class="address-bom" @click="gosub"> 
         提现
       </div>
  </div>
</template>
<script>
import { Group,XInput} from 'vux'
export default {
  components: {Group,XInput},
  data () {
      return {
          payee:'',       //收款人
	      accountType:'',     //账号类型
		  payeeAccount:'',    //收款人账号
		  withdrawalAmount:'',    //提现金额
		  applyManId:'',     //申请人userId
      }
    },
    methods:{
        gosub(){
            var self=this
            var data={
                payee:self.payee,       //收款人
		     	accountType:self.accountType,     //账号类型
			    payeeAccount:self.payeeAccount,    //收款人账号
			    withdrawalAmount:self.withdrawalAmount,    //提现金额
			    applyManId:this.$route.query.userId,     //申请人userId
            }
            this.$axios.post('/device/withdrawal/createWithrawal',data).then(res=>{
                if(res.data.code==1000){
                   self.$vux.toast.show({
                    text: "提交成功，请等待"
                 })
                   self.$router.push({ path:'/Personal', query: { userId: self.$route.query.userId }})
                }else{
                    self.$vux.toast.show({
                    text: res.message
                 })
                }
                    
            })
        }
    }
}
</script>
<style lang="less" scoped>
 .address-bom{
    width:80%;
    margin: 100px auto;
    border-radius: 100px;
    height:78px;
    align-items:center;
    background: #feba4e;
    line-height: 78px;
    font-size: 36px;
    color: #fff;
    justify-content: center;
    display: flex;
    z-index: 999;
  }
  .container{
      width:100%;
      min-height: 100%;
      background: #f6f6f6;
  }
</style>
